<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="baidu_union_verify" content="ad0defde905992d3865f0e5f89474f8c">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8">
    <meta name="shenma-site-verification" content="8a81f73e637c65a7722426cdc3a4a164_1534411920">
    {#    <meta name="csrf-token" content="{{ csrf_token() }}"/>#}
    <title>
        {% block title %}
            {{ BlogInfo.query.first().title }}
        {% endblock %}
    </title>
    {% block stylesheet %}
        <link rel="icon" href="{{ url_for('static', filename='img/favicon.ico') }}" type="image/x-icon">
        <link href="{{ url_for('static', filename='css/bootstrap.css') }}" rel="stylesheet">
        <link href="{{ url_for('static', filename='css/common.css') }}" rel="stylesheet">
        <style>
            .title-inline {
                display: flex;
                margin: 7px;
                font-size: 2.1rem;
            }

            .label {
                display: inline-block;
                padding: .3em .6em;

            }

            .title-inline .badge {
                display: inline-block;
                min-width: 10px;
                padding: 3px 7px;
                font-size: 1.5rem;
                font-weight: bold;
                color: #fff;
                line-height: 1.5;
                text-align: center;
                white-space: nowrap;
                vertical-align: middle;
                background-color: #777;
                border-radius: 10px;
            }

            .navbar-brand {
                background: #252527;
            }

            .owText {
                text-align: center;
                -webkit-text-stroke: 2px #56f583;
                position: relative;
                text-transform: uppercase;
                color: #90bfff;
                font-size: 2vw;
                letter-spacing: 1.2vw;
                font-weight: 300;
                text-shadow: 0 1px 0 #4a4a4e, -1px -1px 0 #4a4a4e, /*main 3d shadow*/ -1px 0px 0 #343437, -2px 1px 0 #343437, -3px 2px 0 #313134, -4px 3px 0 #2f2f31, -5px 4px 0 #2c2c2f, -6px 5px 0 #2a2a2c, -7px 6px 0 #27272a, -8px 7px 0 #252527, -9px 8px 0 #232324, -10px 9px 0 #202022, -11px 10px 0 #1e1e1f, -12px 11px 0 #1b1b1d, -13px 12px 0 #19191a, -14px 13px 0 #161617, -15px 14px 0 #141415, -16px 15px 0 #111112, /*top right*/ 0 -1px 1px #ffffff, 0 -2px 0px #ffffff, /*bottom left corner*/ -15px 14px 0px #ffffff, -16px 15px 0px #ffffff, -17px 16px 0px #ffffff, -18px 17px 0px #ffffff, -2px -1px 0 #ffffff, -3px 0px 0 #ffffff, /*top left corner*/ -19px 15px 0 #ffffff, -18px 14px 0 #ffffff, -17px 13px 0 #ffffff, -16px 12px 0 #ffffff, -15px 11px 0 #ffffff, -14px 10px 0 #ffffff, -13px 9px 0 #ffffff, -12px 8px 0 #ffffff, -11px 7px 0 #ffffff, -10px 6px 0 #ffffff, -9px 5px 0 #ffffff, -8px 4px 0 #ffffff, -7px 3px 0 #ffffff, -6px 2px 0 #ffffff, -5px 1px 0 #ffffff, -4px 0px 0 #ffffff, /*lower right / (upper right side for capital T like H etc letters. */ 0px 2px 0px #ffffff, -1px 3px 0px #ffffff, -2px 4px 0px #ffffff, -3px 5px 0px #ffffff, -4px 6px 0px #ffffff, -5px 7px 0px #ffffff, -6px 8px 0px #ffffff, -7px 9px 0px #ffffff, -8px 10px 0px #ffffff, -9px 11px 0px #ffffff, -10px 12px 0px #ffffff, -11px 13px 0px #ffffff, -12px 14px 0px #ffffff, -13px 15px 0px #ffffff, -14px 16px 0px #ffffff, -15px 17px 0px #ffffff;
            }

            body img {
                width: 100%;
            }

            pre {
            {#padding: 0 !important;#}
            }
        </style>
    {% endblock %}
</head>
<body>
<header>
    <div class='header-top' style="display: none;">
        <div class="container">
            <h2 class="blog-title"><a href="{{ url_for('main.index') }}">{{ BlogInfo.query.first().title }}</a></h2>
            {#            <p class="lead signature">#}
            {#                {{ BlogInfo.query.first().signature }}#}
            {#            </p>#}
        </div>
    </div>
    <nav class="navbar navbar-{{ BlogInfo.query.first().navbar }}" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/"><span itemprop="name" class="owText text-center">橘子洲</span></a>
            </div>
            <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class=""><a href="/"><span class="glyphicon glyphicon-home"> 首页</span></a></li>
                    <li class=""><a href="/personal/"><span class="glyphicon glyphicon-user">简历</span></a></li>
                    {#                    {% for menu in Menu.query.order_by(Menu.order.asc()).all() %}#}
                    {#                        {% if menu.types.count() %}#}
                    {#                            <li class="dropdown">#}
                    {#                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ menu.name }} <b#}
                    {#                                        class="caret"></b></a>#}
                    {#                                <ul class="dropdown-menu">#}
                    {#                                    {% for article_type in menu.types.all() %}#}
                    {#                                        {% if not article_type.is_hide %}#}
                    {#                                            <li>#}
                    {#                                                <a href="{{ url_for('main.articleTypes', id=article_type.id) }}">#}
                    {#                                                    {{ article_type.name }}#}
                    {#                                                </a>#}
                    {#                                            </li>#}
                    {#                                            <li class="divider"></li>#}
                    {#                                        {% endif %}#}
                    {#                                    {% endfor %}#}
                    {#                                </ul>#}
                    {#                            </li>#}
                    {#                        {% endif %}#}
                    {#                    {% endfor %}#}
                    {#                    {% for article_type in ArticleType.query.all() %}#}
                    {#                        {% if not article_type.menu %}#}
                    {#                            {% if not article_type.is_hide %}#}
                    {#                                <li>#}
                    {#                                    <a href="{{ url_for('main.articleTypes', id=article_type.id) }}">#}
                    {#                                        {{ article_type.name }}#}
                    {#                                    </a>#}
                    {#                                </li>#}
                    {#                            {% endif %}#}
                    {#                        {% endif %}#}
                    {#                    {% endfor %}#}
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% if current_user.is_authenticated %}
{#                        <li class="dropdown">#}
{#                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">#}
{#                                <img src="{{ current_user.gravatar(size=18) }}">#}
{#                                {{ current_user.username }} <b class="caret"></b>#}
{#                            </a>#}
{#                            <ul class="dropdown-menu">#}
{#                                <li><a href="{{ url_for('auth.logout') }}">退出登陆</a></li>#}
{#                            </ul>#}
{#                        </li>#}
                    {% else %}
{#                        <li><a href="{{ url_for('auth.register') }}">注册</a></li>#}
                        <li><a href="{{ url_for('auth.login') }}">登录</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
</header>
{% block Content %}
    <div class="content">
        <div class="container">
            <div class="row">
                <div class="col-md-8 article">
                    {% for category, message in get_flashed_messages(with_categories=true) %}
                        <div class="alert alert-{{ category }} alert-dismissable">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            {{ message }}
                        </div>
                    {% endfor %}
                    {% block content %}
                    {% endblock %}
                </div>
                <div class="col-md-4 blog_nav">
                    <div class="entry-box">
                        <h4><strong>文章分类</strong></h4>
                        <p>
                            {% for category in ArticleType.query.all() %}
                                {% if category.id !=1 %}
                                    <div class="title-inline">
                                        <a href="{{ url_for('main.article_types', id=category.id) }}">{{ category.name }}</a>&emsp;
                                        <span class="badge">{{ category.articles.count() }}</span>&emsp;篇
                                    </div>
                                {% endif %}
                            {% endfor %}
                        </p>
                    </div>
                    {% block blog_nav_plugin %}
                        {% for plugin in Plugin.query.order_by(Plugin.order.asc()).all() %}
                            {% if plugin.disabled != True %}
                                {% if plugin.content != 'system_plugin' %}
                                    <div id="{{ plugin.title }}" class="entry-box">
                                        <h5><strong>{{ plugin.title }}</strong></h5>
                                        {{ plugin.content | safe }}
                                    </div>
                                {% else %}
                                    <div class="entry-box">
                                        <h5><strong>博客统计</strong></h5>
                                        <p>访问量：<span class="badge">{{ BlogView.query.first().num_of_view }}</span></p>
                                        <p>
                                            博文总数：<span class="badge">{{ Article.query.count() }}</span>
                                            评论总数：<span class="badge">{{ Comment.query.count() }}</span>
                                        </p>
                                        <p>
                                            {% for source in Source.query.all() %}
                                                <a href="{{ url_for('main.article_sources', id=source.id) }}">{{ source.name }}</a>
                                                ：
                                                <span class="badge">{{ source.articles.count() }}</span>
                                            {% endfor %}
                                        </p>
                                    </div>
                                {% endif %}
                            {% endif %}
                        {% endfor %}
                    {% endblock %}
                </div>
            </div>
        </div>
    </div>
{% endblock %}
<div class="footer">
    <p class="footer-content">
        @2016-2018 橘子洲
    </p>
</div>
<div class="btn-group-vertical floatButton">
    <button id="goTop" class="btn btn-default" title="去顶部" type="button">
        <span class="glyphicon glyphicon-arrow-up"></span>
    </button>
    <button id="refresh" class="btn btn-default" title="刷新" type="button">
        <span class="glyphicon glyphicon-refresh"></span>
    </button>
    <button id="goBottom" class="btn btn-default" title="去底部" type="button">
        <span class="glyphicon glyphicon-arrow-down"></span>
    </button>
</div>
{% block script %}
    <script src="{{ url_for('static', filename='js/jquery-2.2.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/floatButton.js') }}"></script>
    <link rel="stylesheet" href="{{ url_for('static',filename='highlight/styles/atelier-heath-dark.css') }}">
    <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
    {# csrfToken for Ajax   #}
    <script>
        var csrfToken = $('meta[name="csrf-token"]').attr('content');
        $.ajaxSetup({
            beforeSend: function (xhr, settings) {
                if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type)) {
                    xhr.setRequestHeader("X-CSRFToken", csrftoken)
                }
            }
        })
        $(document).ready(function () {
            $('pre').each(function (i, block) {
                hljs.highlightBlock(block);
            });
            $('pre code').each(function (i, block) {
                hljs.highlightBlock(block);
            });
        });
    </script>
    {{ moment.include_moment() }}
    {{ moment.lang('zh-cn') }}
{% endblock %}
</body>
</html>
